import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './router/router'
import eduAlert from './alert/alert'
import store from './store/'
import {routerMode} from './config/env'
import BaiduMap from 'vue-baidu-map'
import './config/rem'
Vue.prototype.$eduAlert=eduAlert;
Vue.use(VueRouter)
Vue.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'dSg3Ui73VByiwZF257tqK8l7'
})
const router = new VueRouter({
	routes,
	mode: routerMode,
	strict: process.env.NODE_ENV !== 'production',
	scrollBehavior (to, from, savedPosition) {
	    if (savedPosition) {
		    return savedPosition
		} else {
			if (from.meta.keepAlive) {
				from.meta.savedPosition = document.body.scrollTop;
			}
		    return { x: 0, y: to.meta.savedPosition || 0 }
		}
	}
})
new Vue({
	router,
	store,
}).$mount('#app')

